
<%@page import="managesystem.Student"%>
<%@page import="tracksystem.Activity"%>
<%@page import="tracksystem.SchoolActivity"%>
<%@page import="tracksystem.OtherActivity"%>
<%@page import="java.util.Calendar" %>
<%
	String url = "/index.jsp?id=";
	Student currStud = (Student) session.getAttribute("currStud");
	if (currStud.getUnfinishedActivity() != null) {
		/**
		 *Auwtch, de gruwelijke instanceOf :O
		 */
		Activity act = currStud.getUnfinishedActivity();
		if (act instanceof SchoolActivity) {
			SchoolActivity sa = (SchoolActivity) act;
			url = url + "school";
			url = url + "&course=";
			url = url + sa.getCourse().getName();
		} else if (act instanceof OtherActivity) {
			OtherActivity oa = (OtherActivity) act;
			url = url + "other";
			url = url + "&type=";
			url = url + oa.getType();
		}
		url = url + "&date=";
		url = url + String.valueOf(act.getStart().getTime());
		url = url + "&resume=true";
	}
	else
	{
		url = url + "home";
	}%>
<script type="text/javascript">
window.location = "<%=url%>"
</script>
	